<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>上传文件</title>
    <script src="${basePath}/js/jquery-1.5.2.min.js"></script>
</head>
<body>
    <form id="form" action="" action_mock="/uploadFile" method="post" enctype="multipart/form-data">
        <table border="0" cellpadding="0" cellspacing="5">
            <tr>
                <td>请求地址</td>
                <td>
                    <input type="text" value="http://127.0.0.1:21700" name="txtUrl" id="txtUrl" maxlength="200"/></td>
            </tr>
            <tr>
                <td>上传文件</td>
                <td>
                    <input type="file" name="file" id="file" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="button" value="提 交" onclick="btnSubmit()"/>
                </td>
            </tr>
        </table>
    </form>
    <script type="text/javascript">
        function btnSubmit() {
            var $form = $("#form");
            $form.attr("action" , $("#txtUrl").val() + $form.attr("action_mock"));
            $form.submit();
        }
    </script>
</body>
</html>
